package com.ease.component.controls {
   import mx.controls.AdvancedDataGrid;
   import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   import mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer;
   
   public class LabelItemRenderer extends AdvancedDataGridItemRenderer {
      public function LabelItemRenderer() {
         super();
         selectable = true;
      }
      
      override public function validateProperties():void {
         super.validateProperties();
         var truncate:Boolean = truncateToFit();
         if (truncate) {
            var dg:AdvancedDataGrid = AdvancedDataGrid(listData.owner);
            var column:AdvancedDataGridColumn = dg.columns[listData.columnIndex];
            toolTip = column.itemToLabel(data);
         } else {
            toolTip = null;
         }
      }
   }
}